﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="AfricanRecipes.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            text-align: center;
        }
        .auto-style2 {
            font-size: larger;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p class="auto-style1">
        <strong><span class="auto-style2">Welcome to the African Recipes website - a sumptuous collection of recipes for a wide range of cuisine !</span></strong><span class="auto-style2"></p>
    <p class="auto-style1">
        </span><strong><span class="auto-style2">Enjoy. More than that, please&nbsp; feel free to add on your own favourite recipes to our collection.</span></strong></p>
    <p class="auto-style1">
        <strong>( Click column header to sort !&nbsp; )</strong></p>
    <p class="auto-style1">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  DataSourceID="SqlDataSource2" Width="745px" AllowSorting="True" DataKeyNames="ID">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" InsertVisible="False" ReadOnly="True" />
                <asp:BoundField DataField="recipeName" HeaderText="Recipe" SortExpression="recipeName" />
                <asp:BoundField DataField="originCountry" HeaderText="Country" SortExpression="originCountry" />
                <asp:BoundField DataField="prepduration" HeaderText="Prep Minutes" SortExpression="prepduration" />
                <asp:ImageField DataImageUrlField="mealpicture" HeaderText="Picture">
                    <ControlStyle CssClass="thumbnail" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="details.aspx?ID={0}" HeaderText="More Detail" Text="Details . . ." />
            </Columns>
        </asp:GridView>

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RecipeConnectionString %>" ProviderName="<%$ ConnectionStrings:RecipeConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [recipeName], [originCountry], [mealpicture], [prepduration] FROM [recipe]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RecipeConnectionString %>" ProviderName="<%$ ConnectionStrings:RecipeConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [recipeName], [originCountry], [mealpicture], [prepduration] FROM [recipe]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="recipeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:RecipeConnectionString %>" ProviderName="<%$ ConnectionStrings:RecipeConnectionString.ProviderName %>" SelectCommand="SELECT [recipeName], [originCountry], [mealpicture], [prepduration], [ID] FROM [recipe]"></asp:SqlDataSource>
    </p>
    <p class="auto-style1">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="addrecipe.aspx">Submit your own recipe !</asp:HyperLink>
    </p>
</asp:Content>
